<!DOCTYPE html>
<html>
 <head> 
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 
  <meta charset="UTF-8" /> 
  
  <meta http-equiv="Cache-Control" content="no-transform " /> 
  <meta name="renderer" content="webkit" /> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> 
  <title>我的购物车</title> 
  <meta name="keywords" content="" /> 
  <meta name="description" content="" /> 
 
  <link href="/homeHTML/cart.css" rel="stylesheet" type="text/css" /> 
  <link href="/homeHTML/cart01.css" rel="stylesheet" type="text/css" /> 

  <script type="text/javascript" src='/homeHTML/jquery-1.8.3.min.js'></script>
  
 </head> 
 <body class="media_screen_1200"> 
 <style type="text/css">
  #payBtn{
    float: right;
    background-color: #366;
    width:120px;
    height:45px;
    border:none;
    font-size:16px;
  }
  #denglu{
    font-size:13px;
  }
 </style>

  <div class="mgj_rightbar" data-ptp="_sidebar"></div> 
  <div id="header" class="J_sitenav header_2015" data-ptp="_head"> 
   <div class="">
    <a href="/" rel="nofollow" style="font-size:20px;" class="home fl">美丽说首页</a>
        <ul class="header_top">
         @if(empty(session('id'))) 
           <!-- // 如果用户没有登录,显示下面这段html代码 -->
           <li class="s1 has_icon user_meta"  clstag='shangpin|keycount|topitemnormal|a02'><a href='/log/log/log'class='link-login style-red'>请登录　　　</a><i class="icon_delta"></i><a href='/register' class='link-regist'>免费注册</a></li>
         @else
           <li class="s1 has_icon user_meta"><a href='/logout' title=''>退出</a><i class="icon_delta"></i></li>
           <li class="s1 has_icon user_meta"><a href='{{url('/list/index')}}' title='会员中心'>会员中心</a><i class="icon_delta"></i></li>
           <li class="s1 has_icon user_meta"><span id='tops_member'>欢迎回来，{{session('member')}}</span><i class="icon_delta"></i></li>
         @endif
          <li class="s1 has_icon has_line user_fav">
            <a rel="nofollow" href="/collect">我的收藏</a>
            <a rel="nofollow" href="/asd">下载文件</a>
            <a rel="nofollow" href="/demo">聊天室</a>
            <i class="icon_delta"></i>
          </li>
          <li class="s1 myorder has_line">
            <a href="{{url('/list/index')}}" class="text display_u" ref="nofollow">我的订单</a></li>
          <li class="s1 has_line has_line user_fav">
            <a href="/cart/index">
              <span >购物车</span></a>
          </li>
        </ul>
   </div> 
  </div> 

  <div id="body_wrap"> 
   <div class="g-header clearfix"> 
    <div class="g-header-in wrap clearfix"> 
     <div class="process-bar"> 
      <div class="md_process md_process_len4"> 
       
      </div> 
     </div> 
     <div class="logo logo-cart"><img src="/homeHTML/logo.png" alt=""></div> 
    </div> 
   </div> 






  <!-- 表格 -->
  
  <!-- 表格 end -->
</script> 
   <div class="g-wrap wrap"> 

    <!-- 不为空的情况 --> 
    <div class="cart_wrap cart_nobdbtm"> 
     <div class="cart_page_wrap" id="cartPage"> 
      
      <!-- 表格 --> 
      <table class="cart_table" id="cartOrderTable"> 
       <thead> 
        <tr> 
         <th class="cart_table_check_wrap cart_alleft pl10">  </th> 
         <th class="cart_table_goods_wrap">商品</th> 
         <th class="cart_table_goodsinfo_wrap">商品信息</th> 
         <th>单价(元)</th> 
         <th class="cart_table_goodsnum_wrap">数量</th> 
         <th class="cart_table_goodssum_wrap">小计(元)</th> 
         <th class="cart_table_goodsctrl_wrap">操作</th> 
        </tr> 
       </thead> 
       <tbody> 
       <form action="/order/insert" method='post'>
        @foreach($goods as $k=>$v)
        <tr class='tr' class="cart_mitem " data-cut="false" data-isless="true" data-bid="13b70js" data-sellerid="1sah7vc" data-stockid="1dx1eks" data-tradeitemid="1fvl3pu" data-ptps="1.6yiaECYM.0.0.XmCdZ" data-ptp="_shoppingcart" data-price="14900"> 
         <td class="vm "> </td> 
         <td class="cart_table_goods_wrap">
          <!-- 商品 --> <a href="" target="_blank" class="cart_goods_img"> <img class="cartImgTip" src="{{$v->goodpic}}" alt="茵曼宽松短袖套头圆领衬衣" height="78" width="78" /> </a> 
          
          <!-- 商品title --><span> 　　　{{$v->goodname}}</span>

          
          <!-- 321活动提醒 <div class="event_tip_wrap"> <p class="event_tips"> <b><img src="" alt=""></b><span class="e_price">321活动提醒</span> </p> </div>--> 
          <!-- 321活动提醒 end --> <p class="remind_btm"> 
           <!-- 降价信息 --> </p> </td> 
         <td> {!! $v->content !!}</td> 
         <td class="cart_alcenter">
          <!-- 单价 --> <p class="cart_lh20 cart_bold cart_data_sprice" data-price="1490"> {{$v->price}} </p> </td> 
         <td class="cart_alcenter">
          <!-- 数量 --> 
          <!-- 总价 -->
          <div> 
           <div class="cart_num cart_counter" data-stockid="1dx1eks" data-stocknum="2" data-timestamp="" data-ptp="1.6yiaECYM.0.0.XmCdZ"> 
            <span>{{$v->num}}</span> 
            <span class="cart_num_add"></span> 
            <span class="cart_num_reduce disable"></span> 
           </div> 
          </div>  </td> 
         <td class="cart_alcenter" xiaoji='xiaoji'>
          <!-- 小计 --> <p  class="cart_deep_red cart_font16 item_sum zj" data-unit="149" data-price="149.00">{{$v->num*$v->price}}</p> </td> 
         <td class="cart_alcenter">
          <!-- 操作 --> <a href="/cart/delete?id={{$v->id}}" class="cart_hoverline delete" class="delete">删除</a> </td>   
        </tr> 
        <script type="text/javascript">
          $('.delete').click(function(){
            var tr = $(this).parents('.tr');
            // remove(tr);
            console.log(tr);
            // tr.remove();
            // return false;
            // $.ajax({
              // url:'/cart/delete',
              // data:{id:{{$v->id}}},
            // })
            // return false;
          })
            
          

        </script>
       @endforeach
        
       @if (count($errors) > 0)
           <div class="alert alert-danger">

               <ul>
                   @foreach ($errors->all() as $error)
                       <li>{{ $error }}</li>
                   @endforeach
               </ul>
           </div>
       @endif
                        
          <center>
            <label><b>收货人:</b><input type="text" name='name'> 　     　　   </label> 
            <label><b>收货地址:</b><input type="text" name='address'>    　　　</label>     
            <label><b>联系电话:</b><input type="text" name='phone'>       </label>
          </center>
        <tr class="J_mundo m-undo"> 
         <td colspan="7"> 
          <div class="m-undo-wrap">
           成功删除 
           <span class="J_num">1</span> 件商品，如有误，可
           <a href="javascript:;" class="J_undo">撤销本次删除</a>
          </div> </td> 
        </tr> 
       </tbody> 
      </table> 
      <!-- 表格 end -->
     </div> 
     <div class="cart_page_wrap" id="cartEmptyPage" style="display:none;"> 
      <div class="cart_empty"> 
       <div class="cart_empty_icon"></div> 
       <h5 class="mb20">您的购物车还是空的，赶快去挑选商品吧！</h5> 
       <ul class="cart_empty_list"> 
        <li>去看看大家都喜欢的<a href="" class="cart_red cart_uline">最热</a></li> 
        <li>去看看正在折扣中的优品<a href="" class="cart_red cart_uline">团购</a></li> 
       </ul> 
      </div> 
     </div> 
    </div> 
    {{csrf_field()}}
    <div class="cart_paybar wrap" id="cartPaybar"> 
      
     <button id="payBtn">提交订单</button>
     @if(!session('id'))

     　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　<b style='color:red' id='denglu'>请先登录用户</b>
     @endif
     <div id='zjj' class="cart_paybar_info_cost cart_deep_red cart_bold cart_font26 cart_money fr goodsSum">
      &yen; <em>1.2</em>
     </div> 
        <input id='orderprice' type="hidden" name='orderprice' value=''>
    </form>
     <div class="cart_paybar_info cart_pregray fr">
       总计： 
     </div> 
     <!-- <div class="act-bottom-event fr"> <img class="event-img" src="" /> <span></span> <span id="J_ActCountdown" data-remaining=""> <span class="an"></span>天<span class="an"></span>小时<span class="an"></span>分<span class="an"></span>秒 </span> </div> --> 
     <div class="cart_paybar_vmbox"> 
      <a href="javascript:;" class="mr10 cart_uline cart_pregray" id="cartRemoveUnuse"></a> 
     </div> 
    </div> 
    <form action="
    " id="postform" method="POST"> 
     <input name="postdata" id="postdata" type="hidden" /> 
     <input name="mtk" value="" type="hidden" /> 
     <input name="ptp" id="ptpdata" type="hidden" /> 
    </form> 
   </div>
  </div> 
  <div class="g-footer"> 
   <p title="mofa015027"> <a href="" target="_blank">美丽说</a> &copy; 2016 Meilishuo.com,All Rights Reserved. </p> 
   <div class="icons"> 
    <a class="vs" href="javascript:;"></a> 
    <a class="mc" href="javascript:;"></a> 
    <a class="up" href="javascript:;"></a> 
    <a class="pa" href="" target="_blank"></a> 
    <a class="kx" href="" target="_blank"></a> 
    <a class="pc" href="" target="_blank"></a> 
   </div> 
  </div> 
  <div style="width: auto; left: 220.5px; top: 301.2px; z-index: auto; display: none;" class="widget_mtip_box mtip_right">
   <div class="widget_mtip_line">
    <div class="cart_imgtip_wrap">
     <img src="/homeHTML/9af9c375354eb717562d07a8c42d_640_832.jpg" width="240" />
    </div>
   </div>
   <i style="display: block; left: 0px; right: auto; top: 42px; bottom: auto;" class="widget_mtip_ang widget_mtip_a"></i>
   <i style="display: block; left: 0px; right: auto; top: 42px; bottom: auto;" class="widget_mtip_shadow widget_mtip_a"></i>
   <a style="display: none;" href="javascript:;" class="widget_mtip_close">&times;</a>
  </div>
  <div id="userdata_el" style="visibility: hidden; position: absolute;"></div>
  <script type="text/javascript">
  var zongjia = 0
 $('td[xiaoji=xiaoji] p').each(function(){
    zongjia += Number($(this).html());
 })

 $('#zjj em').html(zongjia);
 $('#orderprice').val(zongjia);
 $('#orderprice').html(zongjia);





  </script>
 </body>
</html>